/*
 * dacPacketStructs.h
 *
 * Created: 6/13/2013 2:56:25 AM
 *  Author: Tim
 */ 


#ifndef DACPACKETSTRUCTS_H_
#define DACPACKETSTRUCTS_H_

/*********DAC*********/

typedef struct dacInitWaveform_msg
{
	uint8_t Header;
	uint8_t msgHeader;
	
	struct dacInitWaveform_parameterByte1
	{
		uint8_t	DOFFH		:4;
		uint8_t WF			:3;
		uint8_t DCH			:1;
	}PARAM1;
	
	struct dacInitWaveform_parameterByte2
	{
		uint8_t DOFFL;
	}PARAM2;
	
	struct dacInitWaveform_parameterByte3
	{
		uint8_t DFRQH		:3;
		uint8_t RESERVED0	:1;
		uint8_t DAMPH		:3;
		uint8_t RESERVED1	:1;
		
	}PARAM3;
	
	struct dacInitWaveform_parameterByte4
	{
		uint8_t DAMPL;
	}PARAM4;
	
	struct dacInitWaveform_parameterByte5
	{
		uint8_t DFRQL;
	}PARAM5;
	
	uint16_t checkSum;
}dacInitWaveform_t;

typedef struct dacEnable_msg
{
	uint8_t Header;
	uint8_t msgHeader;
	struct dacEnable_parameterByte1
	{
		uint8_t DCHM		:2;
		uint8_t Reserved	:6;
	}PARAM1;
	
	uint16_t checkSum;
}dacEnable_t;

typedef struct dacDisable_msg
{
	uint8_t Header;
	uint8_t msgHeader;
	struct dacDisable_parameterByte1
	{
		uint8_t DCHM		:2;
		uint8_t Reserved	:6;
	}PARAM1;
	
	uint16_t checkSum;
}dacDisable_t;

typedef struct dacUpdate_msg
{
	uint8_t Header;
	uint8_t msgHeader;
	struct dacUpdate_parameterByte1
	{
		uint8_t DCHM		:2;
		uint8_t RESERVED	:2;
		uint8_t DVALH		:4;
		
	}PARAM1;
	
	struct dacUpdate_parameterByte2
	{
		uint8_t DVALL;
	}PARAM2;
	
	uint16_t checkSum;
}dacUpdate_t;

#endif /* DACPACKETSTRUCTS_H_ */